package mtons.cast.modules.persist.service;

import mtons.cast.modules.persist.domain.Account;
import mtons.cast.modules.persist.repository.AccountRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by langhsu on 2017/10/13.
 */
@Service
@Transactional
public class AccountServiceImpl implements AccountService {
    @Autowired
    private AccountRepository accountRepository;

    @Override
    public Account findByUsername(String username) {
        return accountRepository.findOneByUsername(username);
    }
}
